import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { ConfigProvider } from 'antd-mobile';
import zhCN from 'antd-mobile/es/locales/zh-CN';
import Layout from './components/Layout';
import Reception from './pages/Reception';
import MedicalRecord from './pages/MedicalRecord';
import Prescription from './pages/Prescription';
import Examination from './pages/Examination';
import PatientList from './pages/PatientList';

function App() {
    return (
        <ConfigProvider locale={zhCN}>
            <Router>
                <Layout>
                    <Routes>
                        <Route path="/" element={<PatientList />} />
                        <Route path="/reception/:patientId" element={<Reception />} />
                        <Route path="/medical-record/:patientId" element={<MedicalRecord />} />
                        <Route path="/prescription/:patientId" element={<Prescription />} />
                        <Route path="/examination/:patientId" element={<Examination />} />
                    </Routes>
                </Layout>
            </Router>
        </ConfigProvider>
    );
}

export default App; 